﻿using System;
using SharpSqlAnalyzer.nodes;

namespace SharpSqlAnalyzer.stmt.mysql
{
	// Token: 0x02000155 RID: 341
	public class TMySQLFetchCursor : TCustomMySQLStmt
	{
		// Token: 0x06000B80 RID: 2944 RVA: 0x00306321 File Offset: 0x00304521
		public TMySQLFetchCursor(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.sstmysqlfetchcursor;
		}

		// Token: 0x06000B81 RID: 2945 RVA: 0x00306335 File Offset: 0x00304535
		internal override void buildsql()
		{
		}

		// Token: 0x06000B82 RID: 2946 RVA: 0x00306337 File Offset: 0x00304537
		internal override void clear()
		{
		}

		// Token: 0x06000B83 RID: 2947 RVA: 0x00306339 File Offset: 0x00304539
		internal override string getasprettytext()
		{
			return "";
		}

		// Token: 0x06000B84 RID: 2948 RVA: 0x00306340 File Offset: 0x00304540
		internal override void iterate(TVisitorAbs pvisitor)
		{
		}

		// Token: 0x06000B85 RID: 2949 RVA: 0x00306344 File Offset: 0x00304544
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			if (this.rootNode == null)
			{
				return -1;
			}
			TFetchSqlNode tfetchSqlNode = (TFetchSqlNode)this.rootNode;
			base.doParseStatement(psql);
			this.cursorName = tfetchSqlNode.CursorName;
			this.variableNames = tfetchSqlNode.VariableNames;
			return 0;
		}

		// Token: 0x1700021C RID: 540
		// (get) Token: 0x06000B86 RID: 2950 RVA: 0x00306388 File Offset: 0x00304588
		// (set) Token: 0x06000B87 RID: 2951 RVA: 0x00306390 File Offset: 0x00304590
		public virtual TObjectName CursorName
		{
			get
			{
				return this.cursorName;
			}
			set
			{
				this.cursorName = value;
			}
		}

		// Token: 0x1700021D RID: 541
		// (get) Token: 0x06000B88 RID: 2952 RVA: 0x00306399 File Offset: 0x00304599
		// (set) Token: 0x06000B89 RID: 2953 RVA: 0x003063A1 File Offset: 0x003045A1
		public virtual TObjectNameList VariableNames
		{
			get
			{
				return this.variableNames;
			}
			set
			{
				this.variableNames = value;
			}
		}

		// Token: 0x06000B8A RID: 2954 RVA: 0x003063AA File Offset: 0x003045AA
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06000B8B RID: 2955 RVA: 0x003063BA File Offset: 0x003045BA
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			if (this.variableNames != null)
			{
				this.variableNames.accept(v);
			}
			v.postVisit(this);
		}

		// Token: 0x040012B6 RID: 4790
		private TObjectName cursorName;

		// Token: 0x040012B7 RID: 4791
		private TObjectNameList variableNames;
	}
}
